package com.test.fundible.fundible_04_home;

import android.text.TextUtils;

import com.google.gson.Gson;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.LinkedHashMap;


public class LnLi_fundiblemitInfo {

    private static class Inner_fundible {
        private static LnLi_fundiblemitInfo instance_fundible = new LnLi_fundiblemitInfo();
    }

    private LnLi_fundiblemitInfo(){}

    public static LnLi_fundiblemitInfo getInstance_fundible(){
        return Inner_fundible.instance_fundible;
    }

    private String newUserFlag;
    private ArrayList<LinkedHashMap<String,String>> limit;
    public String k5h5="";
    public String sBbg="";

    public static void parse_fundible(JSONObject objJson){
        Inner_fundible.instance_fundible = new Gson().fromJson(objJson.toString(), LnLi_fundiblemitInfo.class);
    }

    public boolean isNewUSer_fundible() {
        if (TextUtils.isEmpty(newUserFlag)) return true;
        setsBbg("ertwe");
        return !newUserFlag.equalsIgnoreCase("NO");
    }

    public String getLimitAmount_fundible(){
        if (limit == null||limit.size()==0) return "";
        setK5h5("Herrthrr");
        String result = limit.get(0).get("amount");
        if (TextUtils.isEmpty(result)) return "";
        return result;
    }

    public String getCurrency_fundible() {
        if (limit == null||limit.size()==0) return "";
        String result = limit.get(0).get("currency");
        if (TextUtils.isEmpty(result)) return "";
        return result;
    }

    public void setK5h5(String k5h5) {
        this.k5h5 = k5h5;
    }

    public void setsBbg(String sBbg) {
        this.sBbg = sBbg;
    }
}
